package com.ebelter.ty.ui.fragment.scale;


import android.os.Bundle;
import android.widget.ImageView;

import com.ebelter.btcomlib.bases.fragment.BaseFragment;
import com.ebelter.btcomlib.utils.AppUtils;
import com.ebelter.btcomlib.utils.log.LogUtils;
import com.ebelter.ty.R;

import java.util.Objects;




/**
 * 血糖
 */

public class Scale_M_B2_Fragment extends BaseFragment {


    public static final String TAG = "Scale_M_B2_Fragment";


    ImageView infopic_water;//水分


    ImageView infopic_vfl;//内脂等级


    ImageView infopic_protein;//蛋白质


    ImageView infopic_bmi;//基础代谢


    @Override
    protected int setLayoutResouceId() {
        return R.layout.scale_m_buttom2_info;
    }

    @Override
    protected void initView() {
        super.initView();
        FV();
    }

    @Override
    protected void initData(Bundle arguments) {
        super.initData(arguments);
        String locale= AppUtils.getLocalStr();

        if (Objects.equals(locale, AppUtils.zh)){//中文
            LogUtils.i(TAG,"用的是zh图");
            infopic_water.setImageResource(R.drawable.infopic_water_zh);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_zh);
            infopic_protein.setImageResource(R.drawable.infopic_protein_zh);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_zh);
        }else if (Objects.equals(locale, AppUtils.en)){
            LogUtils.i(TAG,"用的是en图");
            infopic_water.setImageResource(R.drawable.infopic_water);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl2);
            infopic_protein.setImageResource(R.drawable.infopic_protein);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi);
        }else if(Objects.equals(locale, AppUtils.iw)){
            LogUtils.i(TAG,"用的是iw图");
            infopic_water.setImageResource(R.drawable.infopic_water_iw);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_iw);
            infopic_protein.setImageResource(R.drawable.infopic_protein_iw);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_iw);
        }else if(Objects.equals(locale, AppUtils.ru)){
            LogUtils.i(TAG,"用的是ru图");
            infopic_water.setImageResource(R.drawable.infopic_water_els);
            infopic_vfl.setImageResource(R.drawable.infopic_vfl_els);
            infopic_protein.setImageResource(R.drawable.infopic_protein_els);
            infopic_bmi.setImageResource(R.drawable.infopic_bmi_els2);
        }

    }

    private void FV() {
        infopic_water=mRootView.findViewById(R.id.infopic_water);
        infopic_vfl=mRootView.findViewById(R.id.infopic_vfl);
        infopic_protein=mRootView.findViewById(R.id.infopic_protein);
        infopic_bmi=mRootView.findViewById(R.id.infopic_bmi);
    }









}
